using System;
using Core;
using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.Serialization;

namespace g_gongjianta
{
    [CreateAssetMenu(menuName = "Mini/g_gongjianta/Conf/TblAnchor")]
    public class TblAnchor : AbstractSOTable<int, TblAnchor.Conf>
    {
        [Serializable]
        public class Conf : ITableConf<int>
        {
            public int Index => Id;

            [HorizontalGroup("row0")]
            public int Id;

            [HorizontalGroup("row0")]
            public string Name;

            [HorizontalGroup("row0")]
            public Sprite Icon;

            [HorizontalGroup("row0")]
            public int Attack;

            [HorizontalGroup("row0")]
            public float AttackRange;

            [HorizontalGroup("row0")]
            public float AttackInterval;

            [HorizontalGroup("row1")]
            public TblSkill Skill;

            [HorizontalGroup("row2")]
            public WeaponConf weapon;

            public void Awake() { }
        }

        [Serializable]
        public class WeaponConf
        {
            [HorizontalGroup("row0")]
            public string Name;

            [HorizontalGroup("row0")]
            public Vector2 Offset;

            [HorizontalGroup("row0")]
            public Sprite Icon;
        }
    }
}